﻿using System;
using Microsoft.WowAddonStudio.FrameXml.Serialization.Enumerations;

namespace Microsoft.WowAddonStudio.FrameXml.Serialization.Attributes
{
    /// <summary>
    /// Represents a custom texture attributes.
    /// </summary>
    [AttributeUsage(System.AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
    public class TextureAttribute : Attribute
    {
        /// <summary>
        /// Gets or sets the type of the file.
        /// </summary>
        /// <value>The type of the file.</value>
        public FileType FileType { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="FileAttribute"/> class.
        /// </summary>
        /// <param name="fileType">Type of the file.</param>
        public TextureAttribute(FileType fileType)
        {
            this.FileType = fileType;
        }

        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override string ToString()
        {
            return FileType.ToString();
        }
    }
}
